#ifndef RENDERAREA_H
#define RENDERAREA_H


#include <QBrush>
#include <QPen>
#include <QWidget>
#include "register.h"
#include "group.h"

class Register;


/** Class RenderArea. Represents a render area that displays the fields of the current register.*/
class RenderArea : public QWidget
{
    Q_OBJECT

public:

    //RenderArea(QWidget *parent = 0);
    RenderArea(Register* r);

    QSize minimumSizeHint() const;
    QSize sizeHint() const;

public slots:

    void setPen(const QPen &pen);
    void setBrush(const QBrush &brush);
    void setAntialiased(bool antialiased);
    void setTransformed(bool transformed);

protected:
    void paintEvent(QPaintEvent *event);
    void mousePressEvent ( QMouseEvent * event );

private:
    Register* reg;
    QPen pen;
    QBrush brush;
    bool antialiased;
    bool transformed;

};


#endif // RENDERAREA_H
